Skip to content

feat(scout-for-lol): redesign the in-app Champions index and Champion pages - #5381

Open
shepherdjerred wants to merge 6 commits into
mainfrom
scout-pages-champions
Open

shepherdjerred wants to merge 6 commits into
mainfrom
scout-pages-champions

Conversation

@shepherdjerred

@shepherdjerred shepherdjerred commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Why

The in-app champion page was a comparison table with KDA columns and there was no Champions index. The Warm Friends design (D10 index, D11 champion) puts the friend group first: who plays what, who is best on it, and how you do in lane. Workstream B, wave 1.

What

  • /champions (new): hero with the favourite champion's splash, "Yours" (the viewer's champions, small samples noted), and "Popular with your friends" with the best friend on each. Server chips and a champion search are real controls. Reads consumerChampion.index.
  • /champions/:championId (replaces the old comparison page): HeroPanel with splash art and a statement about where the viewer stands; "Who's best on X" as FriendRow ranking with games, "Won 7 of the last 10" (from last10) and WinRateBar; "Still warming up"; "Most mastery"; "Your matchups" per lane from consumerChampion.matchups, labelled "Ahead at 15 minutes in 5 of 6 lane games" per COPY.md. No tips, builds or public-stats sections.
  • Loaders are preload-only; reads use Loaded.strict; analytics events champions_index_opened and champions_filter_changed; nav gets a Champions entry; /champions is added to the analytics route allowlist. The server still gates every read through the consumer profiles flag: with it off the nav entry is absent and the reads refuse, and the pages show their unavailable state.
  • Design system: FriendRow gains record (games, form, win rate) and onClick (so rows route in-app and keep a real href), with a story, test and CSS.
  • Design audit: champions and champion (Ahri, 103) join the matrix as golden routes (matrix 648 to 684 cases; README counts corrected, they were stale). 32 goldens added.

Stack note: the redesign component stack (#5245, #5255, #5263) is not yet restacked on current main, and the champion endpoints (#5304) are on main. This branch is main plus those five component commits (cherry-picked, content identical), so the diff shows them until that stack lands; restack drops them.

Demo

Champion page, before (old comparison page) then after, 1440 and 390, dark and light. The index has no before: the route did not exist.

1440 dark 1440 light 390 dark 390 light
Before
After

Champions index, after:

1440 dark 1440 light 390 dark 390 light

Captured with PinchTab against dev:design-audit (the audit seed's Ahri fixture), modern skin.

Verification

  • bunx turbo run build typecheck test lint --filter='...[origin/main...HEAD]' on the pre-rebase head: 61 tasks pass (backend 6080 tests included). After the rebase and the last edits: typecheck test lint for app, design-system and design-audit: 34 tasks pass. App 726 tests, design-system 126, design-audit 15. check-architecture clean. bunx lefthook run pre-commit passes.
  • bun run jscpd passes on a base that includes e2695d6d43 (baseline 923 clones, 675 allowed pairs). bun run check-directory-file-counts: no failures, no new warnings.
  • Ranking row: the record column now takes only what its figures need (width: auto, win rate bar 8rem), so the name uses the rest of the row and shows in full at 1440 ("Scout Classic" plus "You"). It truncates only when the row is genuinely too narrow. A long-name story (OnAChampionLongName) covers that case.
  • Design audit Playwright (axe, contrast, keyboard, interactive, console/network, goldens) for both routes in the pinned mcr.microsoft.com/playwright:v1.64.0-noble image against dev:design-audit: 32 goldens rewritten after the row change; 64 comparison runs pass (2 repeats). The image ran as linux/arm64 on a Mac, not the CI amd64 host; the 2% tolerance should absorb it, but CI is the judge.
  • Extended tier: none of app, design-system, design-audit has extended steps.
  • Not run: design-system Storybook catalog e2e (browser lane), live beta check.

🤖 Generated with Claude Code

https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y

@shepherdjerred

Copy link
Copy Markdown
Owner Author

This change is part of the following stack:

Change managed by git-spice.

@greptile-apps

greptile-apps Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@shepherdjerred

Copy link
Copy Markdown
Owner Author

@codex review

Automated re-review request for fdcac12 from the CI review gate.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T04:54:06.369850Z fdcac12 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fdcac125d4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@shepherdjerred
shepherdjerred force-pushed the scout-pages-champions branch 3 times, most recently from 68fa4f9 to 8bb1150 Compare December 3, 2026 07:53
shepherdjerred and others added 6 commits December 3, 2026 00:19
…stem

Why
The Match page was an admin-style review screen. The redesign (D11 Match)
leads with the result, the lane at 15 minutes, how the game went and both
teams, on the shared domain components.

What
- Replaces the consumer match route body with a page built from HeroPanel,
  GameSentenceRow, SetupRow, ChampionFace, WinRateBar, Fold, PageState and
  GoldLeadChart. The result header states the LP change only when a rank
  snapshot exists. The lane figure is read from `roleMatchups` from the
  viewer's side. The gold lead and moments come from `consumerMatch.story`.
- `consumerMatch.detail` loads first and paints the page; `story` starts once
  detail resolves and fills "How it went", build order and skill order. A
  game with no timeline shows only what exists, with no chart or placeholder.
- Adds `consumerMatchLoader` (preload-only) and shared protected query options.
- Adds the match route to the design-audit matrix and seeds the story match
  (ranked win, two tracked friends, LP snapshot) with a pinned audit player id.

Verification
- app: typecheck, lint, test (723 passed); backend typecheck, lint, consumer
  router tests; design-audit test (656-case matrix).
- Rendered at 1440 and 390, modern dark and light, against the design-audit
  seed; no-timeline and short games rendered too.
- Not run: live beta behaviour, the Playwright design-audit browser run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
…in order

Why
The Match page could not tell whether the player it showed was the signed-in
viewer, so the hero named the player and the viewer's row had no chip. The
ordered build also wrapped its separators onto their own lines in the narrow
column.

What
- `consumerMatch.detail` marks each participant `isViewer`, resolved from the
  players the signed-in Discord account is linked to in the scoped servers
  (as `consumerPlayer.home` finds "your" profiles). Three backend tests cover
  the viewer being the subject, someone else, and a teammate of the subject.
- The hero reads "You won as Ahri", the lane names "You", and the viewer's row
  carries the "You" chip; a teammate viewer reads "with ... and you".
- The build is a vertical list ("Malignance first", "then ...") with no
  separators to strand; runes and spells flow as rows.

Verification
- app tests (727) and backend consumer router tests (86) pass; detail
  snapshots gain `isViewer`.
- Full-page captures now neutralise the sticky header and sidebar; a real
  scrolled viewport shot confirms the chrome stays where it belongs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
Why: the lane_results change (#5305) added a required checkpoint to RoleMatchup, so the Match page fixture no longer typechecked against main.
What: the fixture's role matchup is a complete checkpoint.
Verification: app and design-audit typecheck, lint and test:ci pass; bun run jscpd passes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
…g on current main

Why: after restacking onto main the isViewer tests seeded no linked account (the shared seed helper call dropped the Discord id), and the design-audit seed grew past the function and file line limits.
What: trackedPlayer passes discordId to seedConsumerPlayer; the story rank, story game and timeline concatenation live in design-audit-story-fixture.ts, and the subscription and competition seed moves to design-audit-competition-fixture.ts.
Verification: backend typecheck, lint and test:ci pass (one prune-players hook timeout under load, unrelated and not in this diff); bun run jscpd passes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
… pages

Why
The Champions index and Champion pages were admin-style tables (a comparison
leaderboard with KDA columns, and no index at all). The Warm Friends design
puts a friend group first: who plays what, who is best on it, and how you do
in lane.

What
- /champions: hero with the favourite champion, the viewer's champions, and
  what friends play with the best friend on each; server chips and a champion
  search are real controls.
- /champions/:championId: hero with splash art, a FriendRow ranking with games,
  last-10 form and win rate bars, "Still warming up", most mastery, and the
  viewer's matchups per lane. Ahead at 15 minutes is labelled with its own
  lane-game count ("Ahead at 15 minutes in 5 of 6 lane games").
- Preload-only loaders, Loaded.strict reads, analytics events, nav entry; the
  consumer profiles flag still gates every read on the server.
- FriendRow gains a `record` (games, form, win rate) and `onClick`.
- Both routes join the design-audit matrix as golden routes.

Verification
- app, design-system, design-audit: typecheck, lint, tests; check-architecture.
- Rendered in PinchTab through dev:design-audit at 1440 and 390, dark and light.
- design-audit Playwright (axe, contrast, keyboard, goldens) for both routes
  in the pinned Playwright image: 32 goldens written, 96 comparison runs pass.
  The image ran as linux/arm64 on a Mac, not the CI amd64 host.
- Not run: live beta check.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
…hampion leaderboard

Why: the compare read returns one page of at most 25 rows by win rate, so the group average and "the most games" described only that page as the whole group (review P2 on #5381).
What: when the leaderboard is truncated the hero says the viewer's own record only.
Verification: app typecheck, lint and test:ci pass; the truncated hero test now pins the shorter line.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant